/* 
Jeremy Daugherty
Started 8/25/2012
Advancement, a Game of progress
Advancement Objects
*/

struct coor
{
  // the 3D coordinates of objects on their home.
  // may change type later.
  int x;
  int y;
  int z;
};


/*
the base class for all massive objects and the data holder all stars
*/
class star
{
  protected:
    // For The first slot is the type of star O,B,A,F,G,K,M,N,B, and W
    // The second is the binary type it is, if it is binary
    // B binary, S large difference,  N for single,
    // After that is the ID based on the location.
    const char m_ID[20];
    
    std::string m_name;
    
    // If you don't know what these hold your an idiot
    double m_mass; // between 13 Jupiters and 120 suns
    unsigned int m_radius; // measured in solar radii .3-120
    unsigned int m_temperature; // in C or K of the surface
    unsigned int m_brightness;
    unsigned int m_magneticSphere;
    // The strength of the magnetic field over the planet,
    // this is mostly for more fancy energy systems and special things.
    // Low level magnetic fields have to be strengthend for planets to
    // be naturally habitable, too strong and it will cause a maintenance.
    // Most moons don't need a field because of the parent.
    // measuring method TBD (arbitrary system most likely)
      
    star *m_binaryCenter;
      // the center of the binary system of which it is centered.
      
    // TODO
    // position
    // Model
    
    // as a note, "_ALL STARS_" use the same model, the texture
    // is procedural and randomizes. The color is dependent on
    // the type of star.
    // While on planet the star(s) are not generated, but act as
    // a distant or flat light source. (black holes excluded)
    
};

class jovian : protected star
{
  protected:
    // char m_ID[20]
    // string  m_name;
    // star *m_partner
      // Partner will be used for binary orbits
      // jovians don't go into binary orbits. Partner is always Null
      
    // double m_mass
    // int m_radius
    // int m_temperature
    // brightness is not used as it is for stars only
    
    star *m_parent;
    
    float m_g; // I don't think I really need to right this out,
    // it's the acceleration (m/s^2) due to gravity on the planet
    // surface.
    
    // TODO: replace insert value
    float m_composition[/*insert value*/];
    // This is for the harvesting of planets, general things mostly 
    // may have details for specific things, water, methane, oxygen,
    // metals, whatever. fairly general, not to specific, used for
    // spliting the mass of the planet among materials.
    
    unsigned int m_orbit;
    // or the semi-major axis 
    
    float m_eccenticity;
    // the deviation from the orbit.
    // within the orbit * deviation - Hill 
    // and orbit + orbit * deviation + hill  there is nothing else
    
    float m_node;
    // the angle away from zero.
    
    unsigned int m_hill;//hill sphere
    // based on the mass of the star, planet, and orbit, 
    // this is the gravity well of the planet, all moons are within half
    // the hill sphere. I'll ignore hill sphere deviation for fun.
    
    unsigned int m_temperature;
    // the temperature is based off of the addition of the addition
    // of the stars data, Pulsing and eccentric orbits creates a
    // standard deviation based on its closest and farthest points.
    
    int m_Tvariance; // standard variance of 2-5 degrees, pulsing creates
    //  a larger variance.
    
    float m_atmosphere; // This is the sea level atmospheric pressure.
    // With this it it helps define sea level and also what it holds.
    // It is determined by the total composition of gases, it also
    // helps determing the hase of the planet.
    
};

class planet : protected jovian
{
   // the only difference between the Jovian and the planets are the more
   // detailed maps, that can be traveled upon in a complex manner
   // and a simple climate map that will cover temperature and humidity.
   // also has an extra thing for material reserves based on precentage.
   
   
};

/*

  Religion
  
Early on in the development of empires if no religion exists in a region one
will be made with a bias to unused beliefs. Religions are defined by a number
of beliefs, what is human, what is alive, what power rules the universe, the
value of life, etc. the closer two religions are to each other in beliefs the
more they like each other. However religions that come from a schism have VERY
strong animosity between them. Any further schisms on eather side maintain the
animosity. 

Schisms have no limit to how many or how often they can happen. The only limit
is that once all possible beliefs are solitified there will be a massive
decrease in the number of schisms for that religion. 

The expansion of concrete religious beliefs are solitified in similarity to the
Holy city of the religion. Every city has a copy and can make it's own 
alterations to the religion. The Holy city is consitered the center of all 
religious decisions, occasionally (mostly dependent on the centrality of power
in the religion) other cities may overcome the holy city on a belief. If the 
religion is highly organized and attempts cohesiveness of beliefs around a 
seat of power it is more likely to schism, more decentiralized religions will
take the most popular view of the belief. One belief encourages these
differences and ignores schisms to a point, so long as the base beliefs are 
intact.

There are two levels of beliefs.

Primary is central and are required to form a religion. This is things along
the lines of the general view on metaphysical nature. These can be repeated in 
different unrelated religions and on their own do not create a standardized
religion. These weed out some secondary beliefs, but the majority will most
likely remain. The more extreme the difference in these beliefs the larger the
negative disposition. The foolish people who delude themselves with any deity
don't hit it off well with godless heathens.

Secondary are the spices that add the more general things and define a full
religion. These are more important in the long run and define the meaningful 
views on the world. These define how the people will react to the actions of
empires. These are also what separate religions and denominations from each
other.

With Schismed religions animosity can be overcome, but it will be very hard
time working the best, but actions they take could improve or degrade the 
relationship as well.

The bottom line of all religion is Athiesm. No God or gods, no afterlife or soul
no consistent morality. The only advantage given is the guerantee you won't get
a bad modifiers and no happiness modifiers to any action you do. 

In religious 'thinning' as time passes, the generally happier, more productive,
and more concrete religions will grow and overcome smaller religions.
Especially if there is some happy end promises and other such things.

A religion is consitered dead when it has a total believer population of less
than 100 or 1000 with now forseable growth in 10 years.

*/

class Belief
{
  private:
    // What it modifies
    // some pointers probably
    
    // how it modifies it
    // some number things
    
    // Description
    std::string m_desc;
    
    // how it swings on the mod topic
    short m_choice; // values from -1 to 2
    // -1 is no, 0 is undecided, 1 yes, 2 is unimportant (neither)
};

class religion
{
  
  /*
  Primary religious beliefs
  
    Deity based
      No god(s), Impersonal* god(s), personal* god(s)
                                  impersonal means emotionless entity that sets
                                  rules for the system
                                  Personal means emotive entity that not only
                                  sets the rules but created the world
    
    Soul based
      No Soul, No afterlife (cyclical rebirth), Afterlife
----------------------
    No god(s) and No Soul
      Your an Athiest, any consistent or objective morality is gone.
      General disposition to immoral, selfish, and negative activity.
      
    Impersonal / personal god(s) and No Soul
      Creates rather negative religious groups, often centered around 
      pleasure seeking and self gratification, can be extended to destructive
      and violent actions. Morality is ignored for pleasure, but that is no
      guerantee.
      
    No god(s) and a soul (regardless of afterlife)
      People generally hold to some sembalence of morality, but it is only
      slightly higher than other groups.
      
    Impersonal god(s) and a soul but no afterlife
      Morality generally more enforced, tendecy to form a caste system. Not
      particularly preservative of life. 
      
    Personal god(s) and a soul but still no afterlife
      Morally stronger than Impersonal, again caste system possible. Slightly
      more preservative of life. Tendency to conflict with Science.
      
    Impersonal god(s) and an afterlife
      Strong morality, strong preservation of life. Impassive with science, but
      still slightly negative.
    
    Personal god(s) and an afterlife
      Strongest Morality, Highest importance on life. Also, strongest conflict
      with science. It also has a tendency for higher specialization and higher
      happiness.
    
  */
  
  private:
    
    // primary Theistic belief
    enum primaryDeity { NonThes=0, MonThes=1, PolyThes=2, MonoThes=3} m_Deity;
    
    // primary Soul belief
    enum primarySoul { NoSoul=0, Rebirth=1, Afterlife=2} m_Soul;
    
    // secondary belief holders
    Belief *m_beliefs;
    
    // the number of complete beliefs
    int m_numBeliefs;
};
